﻿<html>
<body>
	<h1>测试窗口</h1>
    <div>
        <button onclick="onClick()">
            主程序打开窗口(appId: 'openDialog')
        </button>
    </div>
    <div>
        <button onclick="onCloseDlog()">
            主程关闭指定窗口(appId: 'openDialog')
        </button>
    </div>
    <div>
        <button onclick="onMinAll()">
            主程序最小化所有窗口
        </button>
    </div>
    <div>
        <button onclick="onCloseAll()">
            主程序关闭所有窗口
        </button>
    </div>
    
	<script>
        function onClick(){
            top.postMessage({
                msg:"openDialog",
                params:{
                    title: '窗口url',
                    width: 700,
                    height: 650,
                    close: true,
                    min: true,
                    max: true,
                    resize: true,
                    minWidth: 600,
                    minHeight: 400,
                    url:'//dos.zczc.cz/',
                    target:"self",
                    view: "~xl/plugins/iframe/index",
                    appId: 'openDialog'
                }
            },'*');
        }
		
        function onMinAll(){
            top.postMessage({
                msg:"minAllDialog",
            },'*');
        }
        
        function onCloseDlog(){
            top.postMessage({
                msg:"closeDialog",
                params:{
                    appId: 'openDialog' 
                }
            },'*');
        }
        function onCloseAll(){
            top.postMessage({
                msg:"closeAllDialog",
            },'*');
        }
	</script>
</body>
</html>